Conditions | 1 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1 |
Changes | 0 |
1 | import { SortOptions, ObjectType, SortedEntry } from './types'; |
||
9 | |||
10 | // Object entry handling |
||
11 | function collectObjectEntries(obj: ObjectType): SortedEntry[] { |
||
12 | 1398 | const stringEntries = Object.entries(obj); |
|
13 | 1398 | const symbolEntries = Object.getOwnPropertySymbols(obj).map( |
|
14 | 5 | (symbol) => [symbol, obj[symbol]] as SortedEntry |
|
15 | ); |
||
16 | |||
17 | 1398 | return [...stringEntries, ...symbolEntries]; |
|
18 | } |
||
42 |